package stardust.core.support.db;


public abstract class StardustDB
{

  public final static XiaoYuanDataSource DATA_SOURCE = new XiaoYuanDataSource();

  static
  {
//    DATA_SOURCE.setDriverClass("oracle.jdbc.OracleDriver");
//    DATA_SOURCE.setUrl("jdbc:oracle:thin:@localhost:1521:CH2");
//    DATA_SOURCE.setUsername("CH2");
//    DATA_SOURCE.setPassword("CHANGCHANG");
//    DATA_SOURCE.setCacheCount(10);
//    DATA_SOURCE.setMaxCount(0);
    
      DATA_SOURCE.setDriverClass("com.mysql.jdbc.Driver");
	    DATA_SOURCE.setUrl("jdbc:mysql://HOME-CH2-ASUS:3306/stardust?useUnicode=true&amp;characterEncoding=utf8");
	    DATA_SOURCE.setUsername("root");
	    DATA_SOURCE.setPassword("mysql");
	    DATA_SOURCE.setCacheCount(50);
	    DATA_SOURCE.setMaxCount(0);
  }

  public static DataAccessObject getDataAccessObject()
  {
    return new DataAccessObject(DATA_SOURCE.getConnection());
  }

}
